using UnityEngine;
using UnityEngine.UI;

namespace Gj
{
    public class RankHelper : NodeHelper
    {
        public GameObject first;
        public GameObject second;
        public GameObject thrid;
        public Text text;

        protected override BindDataType bindDataType => BindDataType.Int;

        protected override void BindData(int i)
        {
            if (i == 1)
            {
                first.SetActive(true);
                second.SetActive(false);
                thrid.SetActive(false);
                text.gameObject.SetActive(false);
            }
            else if (i == 2)
            {
                first.SetActive(false);
                second.SetActive(true);
                thrid.SetActive(false);
                text.gameObject.SetActive(false);
            }
            else if (i == 3)
            {
                first.SetActive(false);
                second.SetActive(false);
                thrid.SetActive(true);
                text.gameObject.SetActive(false);
            }
            else
            {
                first.SetActive(false);
                second.SetActive(false);
                thrid.SetActive(false);
                text.text = i.ToString();
                text.gameObject.SetActive(true);
            }
        }
    }
}